package scene;

import javax.media.j3d.Background;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
import javax.vecmath.Point3d;


/**
 * Weisser Hintergrund fuer die Szene.
 * 
 * @version 1.0
 * @author Imanuel Rohlfing
 */
public class SceneBackground {
	/** BranchGroup fuer den Hintergrund */
    private BranchGroup backgroundBG;
    
    /**
     * Konstruiert den Hintergrund und fuegt ihn der BranchGroup hinzu.
     */
    public SceneBackground() {
        Background background = new Background();
        background.setColor( 1.0f, 1.0f, 1.0f );
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), Double.MAX_VALUE);
        background.setApplicationBounds( bounds );
        backgroundBG = new BranchGroup();
        backgroundBG.addChild( background );  
    }
    
    /**
     * Liefert BranchGroup des Hintergrunds.
     * @return
     */
    public BranchGroup get(){
        return backgroundBG;
    }  
}
